<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
 <!-- 最新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="bootstrap-3.0.3/css/bootstrap.min.css">
<!-- 可选的Bootstrap主题文件（一般不用引入） -->
<link rel="stylesheet" href="bootstrap-3.0.3/css/bootstrap.theme.min.css">
<link rel="stylesheet" href="bootstrap-3.0.3/css/bootstrap.css">
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="bootstrap-3.0.3/js/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="bootstrap-3.0.3/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery-1.12.4.js"></script>
<script type="text/javascript">	
	$(function(){
		
		$("#oneselect").change(function(){
			$.getJSON("twoAll",{parentId:$(this).val()},function(data){
				
				$("#towselect").html("");
				$.each(data,function(i,item){	
					
					$("<option value='"+item["id"]+"'>"+item["categoryName"]+"</option>").appendTo("#towselect");
					
				})
			})
		})
		$("#towselect").change(function(){
			
			$.getJSON("threeAll",{parentId:$(this).val()},function(data){
				
				$("#threeselect").html("");
				$.each(data,function(i,item){	
					
					$("<option value='"+item["id"]+"'>"+item["categoryName"]+"</option>").appendTo("#threeselect");
					
				})
			})
		})
		
	})
</script>

<link rel="stylesheet" href="bootstrap-3.0.3/css/bootstrap.css">
<style type="text/css">
	
	form div{
		margin-top: 20px;
	}
	
	.select {
	width: 1200px;
	height:300px;
	margin-left: 30px;
	margin-top: -300px;
	}
.show{
	margin-left:30px;
	border:1px solid black;
	width: 1200px;
}
}
</style>

</head>
<body>
	<div class="select">
  <div class="col-md-12 col-sm-12 col-xs-12">
    <div class="x_panel">
      <div class="x_title">
        <h2>查看APP信息 <i class="fa fa-user"></i><small>${devUserSession.devName}</small></h2>
             <div class="clearfix"></div>
      </div>
      <div class="x_title">
            <h2>APP基础信息</h2>
          <div class="clearfix"></div>
      </div>
      <div style="margin-left: -600px;width: 600px">
	<form action="doappupdate"  method="post" style="width: 400px;margin-left: 500px">
	<input type="hidden" name="id" value="${appInfo.id}"/>
		<div class="input-group" >
			<span class="input-group-addon">软件名称*</span> <input type="text" value="${appInfo.softwareName}" name="softwareName"
				class="form-control" placeholder="请输入软件名称">
		</div>
		<div class="input-group" >
			<span class="input-group-addon">APK名称*</span> <input type="text"  value="${appInfo.aPKName}" name="aPKName"
				class="form-control" placeholder="请输入APK名称">
		</div>
		<div class="input-group" >
			<span class="input-group-addon">支持ROM*</span> <input type="text" value="${appInfo.supportROM}" name="supportROM"
				class="form-control" placeholder="请输入支持的ROM">
		</div>
		<div class="input-group" >
			<span class="input-group-addon">界面语言*</span> <input type="text"  value="${appInfo.interfaceLanguage}"  name="interfaceLanguage"
				class="form-control" placeholder="请输入软件支持的界面语言">
		</div>
		<div class="input-group">
			<span class="input-group-addon">软件大小*</span> <input type="text" value="${appInfo.softwareSize}" name="softwareSize"
				class="form-control" placeholder="请输入软件大小，单位为Mb"">
		</div>
		<div class="input-group">
			<span class="input-group-addon">下载次数*</span> <input type="text" value="${appInfo.downloads}" name="downloads"
				class="form-control" placeholder="请输入下载次数">
		</div>
		<div class="input-group">
			<span class="input-group-addon">所属平台*</span><select name="flatformId" class="form-control"><option value="0">请选择</option>
		<c:forEach items="${flatformList}" var="temp">
		
			<option <c:if test="${appInfo.flatformId==temp.valueId}">selected="selected"</c:if>  value="${temp.valueId}">
				${temp.valueName}	
			</option>
		</c:forEach></select>
		</div>
		<div class="input-group">
			<span class="input-group-addon">一级分类*</span> <select name="categoryLevel1" class="form-control"  id="oneselect" ><option value="0">请选择</option>
			<c:forEach var="c" items="${listone }" varStatus="i">
				<option value="${ c.id}" selected="selected">${c.categoryName}</option>	
			</c:forEach>
			</select>
		</div>
		<div class="input-group">
			<span class="input-group-addon">二级分类*</span> <select name="categoryLevel2" class="form-control" id="towselect">
				</select>
		</div>
		<div class="input-group">
			<span class="input-group-addon">三级分类*</span><select name="categoryLevel3" class="form-control" id="threeselect">
			</select>
		</div>
		<div class="input-group">
			<span class="input-group-addon">APP状态*</span><select name="status" class="form-control">
		<c:forEach items="${statusList}" var="temp">
			<option <c:if test="${appInfo.status==temp.valueId}">selected="selected"</c:if> value="${temp.valueId}">
				${temp.valueName}
			</option>
		</c:forEach></select>
		</div>
		
		
		<div class="input-group">
			<span class="input-group-addon">应用简介*</span> <textarea class="form-control" name="appInfo"
			 rows="3">${appInfo.appInfo}</textarea>
		</div>
		<div class="input-group">
			<span class="input-group-addon">LOGO图片*</span> <img alt="test" src="dsfa">
		</div>
		
		
	</form>
	</div>
     	<div class="show">
        <div class="">
            <h2>历史版本列表</h2>
            <ul class="nav navbar-right panel_toolbox">
              <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
              </li>
            </ul>
          <div class="clearfix"></div>
        </div>
        <div class="x_content" style="display: block;">
         <br>
        <div id="datatable-responsive_wrapper"
			class="dataTables_wrapper form-inline dt-bootstrap no-footer">
			<div class="row">
				<div class="col-sm-12">
					<table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap dataTable no-footer dtr-inline collapsed"
						cellspacing="0" width="100%" role="grid" aria-describedby="datatable-responsive_info" style="width: 100%;">
						<thead>
							<tr role="row">
								<th class="sorting_asc" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 70px;" aria-label="First name: activate to sort column descending"
									aria-sort="ascending">软件名称</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 10px;"
									aria-label="Last name: activate to sort column ascending">
									版本号</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 90px;"
									aria-label="Last name: activate to sort column ascending">
									版本大小(单位:M)</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 50px;"
									aria-label="Last name: activate to sort column ascending">
									发布状态</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 50px;"
									aria-label="Last name: activate to sort column ascending">
									APK文件下载</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 50px;"
									aria-label="Last name: activate to sort column ascending">
									最新更新时间</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${versionList}" var="temp" varStatus="i">
								<tr>
									<td>${appInfo.softwareName}</td>
									<td>${temp.versionNo}</td>
									<td>${temp.versionSize}</td>
									<td>${versionName}</td>
									<td>${temp.apkFileName}</td>
									<td>${temp.modifyDate}</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				</div>
			</div>
      </div>
    </div>
    </div>
     <div class="form-group">
        <div class="col-md-6 col-md-offset-3">
        	<button type="button" class="btn btn-info"><a href="updatestatusaudit?id=${appInfo.id }&status=2">审核通过</a></button>
        	<button type="button" class="btn btn-info"><a href="updatestatusaudit?id=${appInfo.id }&status=3">审核不通过</a></button>
          <button type="button" class="btn btn-success" id="back"><a href="AppAudit">返回</a></button>
        </div>
      </div>
    <div class="clearfix"></div>
    <br/><br/>
  </div>
</div>
</div>
</body>
</html>